package org.xsk.mall.pms.controller.convert;

import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.factory.Mappers;
import org.xsk.mall.api.pms.PageQueryCategoryReq;
import org.xsk.mall.api.pms.PageQueryCategoryRespData;
import org.xsk.mall.pms.domain.model.PmsProductCategoryModel;
import org.xsk.mall.pms.domain.model.PmsProductCategoryQueryModel;

import java.util.List;

/**
 * description: 商品分类转换器
 * <p>
 * date: 2021/8/19 10:30
 * author: x-one
 */
@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface ProductCategoryConvert {
    ProductCategoryConvert INSTANCE = Mappers.getMapper(ProductCategoryConvert.class);

    PmsProductCategoryQueryModel reqToModel(PageQueryCategoryReq req);

    List<PageQueryCategoryRespData> modelListToDataList(List<PmsProductCategoryModel> list);
}
